import { createRouter, createWebHashHistory } from 'vue-router'
import login from '../views/LoginView.vue'
import IndexView from '../views/IndexView.vue'
import StudentView from '../views/StudentView.vue'
import courseView from '../views/CourseView.vue'

const routes = [
  {
    path: '/',
    name: 'login',
    component: login
  },
  {
    path: '/index',
    name: 'index',
    component: IndexView,
    children: [
      {
        path: '/student',
        name: 'student',
        component: StudentView
      },
      {
        path: '/course',
        name: 'course',
        component: courseView
      }
    ]
  },

]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
